<?php
use think\Config;
?>
<!doctype html>
<html>

<head>
    <meta charset="utf-8">
    <title>
        <?php echo Config::get('appname');?>
    </title>
    <link href="/static/css/default.css" rel="stylesheet" type="text/css">
    <link href="/static/css/style/green.css" rel="stylesheet" type="text/css" id='link'>
    <script src="/static/js/echarts/echarts.js"></script>
    <style>
        html {
            overflow: hidden;
        }
    </style>
</head>

<body>
    <div id="app">
        <ul class="toollist">
            <li>
                <div class="listbox"><i class="iconfont">&#xe6da;</i><em>{$mymoney}<p>余额</p></em></div>
            </li>
            <li>
                <div class="listbox"><i class="iconfont">&#xe6da;</i><em>{$num}<p>机构数量</p></em></div>
            </li>
          


        </ul>


        

        
    </div>
</body>
<script type="text/javascript" src="/static/js/jquery.js"></script>
<script type="text/javascript" src="/static/js/common.js"></script>
<script type="text/javascript" src="/static/js/skin.js"></script>
<script src="/static/js/layer/layer.js"></script>
<script type="text/javascript" src="/static/js/vue2.js"></script>


<script>
    var vm = new Vue({
        el: "#app",
        data: {
            cur: 1,
            all: 0,
            size: 10,
            allcount: 0,
            arrayData: [],
            arrayDatadaoqi: [],
            daili: []
        },
        methods: {

            getdata: function (_keycontent) {  //查询数据

                var self = this;
                $.post("/super/Mechanism/GetMechanism", { page: self.cur, size: self.size }, function (_result) {
                    self.arrayData = _result.list;

                });

                $.post("/super/Mechanism/GetMechanism", { page: self.cur, size: self.size, "daoqi": 1 }, function (_result) {
                    self.arrayDatadaoqi = _result.list;

                });

                $.post("/super/Mechanism/daililistseq", {}, function (_result) {
                    self.daili = _result;

                });

            },

        },
        created: function () {  //初始化事件里边去调用查询方法
            this.getdata("");
        }
    });
</script>
<script type="text/javascript">
    // 基于准备好的dom，初始化echarts实例
    var myChart2 = echarts.init(document.getElementById('chart3'), 'uimaker');

    // 指定图表的配置项和数据   

    $.post("/super/Mechanism/jigouaddresstj", function (data) {

        var items = [];
        var value = [];
        for(var i=0;i<data.length;i++){
            items.push(data[i].province);
            value.push(data[i].num);
        }
        console.log(items);

        option = {
            tooltip: {
                trigger: 'item',
                textStyle: { fontSize: 14 },
                axisPointer: {            // 坐标轴指示器，坐标轴触发有效
                    type: 'shadow'        // 默认为直线，可选为：'line' | 'shadow'
                }
            },

            grid: {
                x: 60,
                x2: 40,
                y: 10,
                height: 140
            },
            calculable: true,
            xAxis: [
                {
                    type: 'category',
                    data: items
                }
            ],
            yAxis: [
                {
                    type: 'value'
                }
            ],
            series: [
                {
                    name: '直接访问',
                    type: 'bar',
                    data: value
                },


            ]
        };
        // 使用刚指定的配置项和数据显示图表。
        myChart2.setOption(option);
        window.addEventListener("resize", function () {
            myChart2.resize();
        });

    });


</script>

</html>